package com.ty.blog.service.blog.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ty.blog.common.utils.PageUtils;
import com.ty.blog.common.utils.Query;
import com.ty.blog.dao.ArticleLabelRefDao;
import com.ty.blog.dto.req.ArticleLabelRefEntityReq;
import com.ty.blog.entity.ArticleLabelRefEntity;
import com.ty.blog.service.blog.ArticleLabelRefService;
import com.ty.blog.service.blog.BaseService;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("xBlogArticleLabelRefService")
public class ArticleLabelRefServiceImpl
    extends ServiceImpl<ArticleLabelRefDao, ArticleLabelRefEntity>
    implements ArticleLabelRefService,
        BaseService<ArticleLabelRefEntity, ArticleLabelRefEntityReq> {

  @Override
  public PageUtils queryPage(Map<String, Object> params) {
    IPage<ArticleLabelRefEntity> page =
        this.page(
            new Query<ArticleLabelRefEntity, ArticleLabelRefEntityReq>().getPage(params),
            new QueryWrapper<ArticleLabelRefEntity>());

    return new PageUtils(page);
  }
}
